import autoImport from "unplugin-auto-import/vite";
import { Plugin } from "vite";
import path from "path";

export default function createAutoImport(): Plugin {
  return autoImport({
    imports: ["vue", "pinia"],
    dts: path.resolve(process.cwd(), "src/types/auto-imports.d.ts"),
    dirs: [
      path.resolve(process.cwd(), "src/hooks/**")
    ]
  });
}
